#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
	freopen("tree.in", "r", stdin);
	freopen("tree.out", "w", stdout);
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	int T;
	cin >> T;
	while(T--) {
		int x;
		cin >> x;
		int l = 2, r = 2e9 + 1, ans = 2;
		while(l <= r) {
			int mid = (l + r) / 2, tmp = 0;
			if(mid % 2 == 0) tmp = (mid / 2) * (mid / 2 - 1);
			else tmp = (mid / 2) * (mid / 2);
			if(tmp >= x) {
				ans = mid;
				r = mid - 1;
			}
			else l = mid + 1;
		}
		int tmp = 0;
		if(ans % 2 == 0) tmp = (ans / 2) * (ans / 2 - 1);
		else tmp = (ans / 2) * (ans / 2);
		
		if(x % 2 && !(ans % 2) && !(tmp % 2)) ++ans;
		cout << ans << endl;
	} 
	return 0;
}

